import java.io.IOException;


public class blastsp_sp {

	/**
	 * @param args
	 */
	public static String[] SpecieNameList = { "05ZYH33", "98HAH33", "A7", "BM407", "D9", "D12", "GZ1", "JS14", "P1_7", "S735", "SC84", "SS12", "ST1", "ST3" };

	  public static void main(String[] args) throws InterruptedException
	  {
	    String command = null;

	    for (int i = 0; i < SpecieNameList.length; i++)
	      for (int j = 0; j < SpecieNameList.length; j++) {
	        Runtime runtime = Runtime.getRuntime();
	        command = "blastall -i ../small_data/" + SpecieNameList[i] + ".smallfaa -d " + SpecieNameList[j] + ".smallfaa -o ./blastresults/" + SpecieNameList[i] + "-" + SpecieNameList[j] + ".blastout -p blastp -F F -e 1e-10 -b 1 -v 1 -m 8";
	        try {
	          Process process = runtime.exec(command);
	          process.waitFor();
	        }
	        catch (IOException e) {
	          e.printStackTrace();
	        }
	      }
	  }
	}